#include <iostream>
#include "tv.h"

int main(int argv, char**argc)
{
    printf("************  test hello zc!!!   **************\n");
    /*
    add test code!
    */

    try{
		std::string factoryName = "HaierTVFactory";    //这里假装从xml中读取
		TV *tv = nullptr;
		TVFactory *factory = (TVFactory*)ClassFactory::getInstance().getClassByName(factoryName);
		tv = factory->produceTV();
		tv->play();
	}catch(const std::string *e){
		std::cout << e << endl;
	}
	return 0;

}